<?php

namespace app\admin\model;

use think\Model;

class MallOrderGoods extends Model
{
    // 表名
    protected $name = 'mall_order_goods';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;

    // 追加属性
    protected $append = [

    ];

    public function mallorder()
    {
        return $this->belongsTo('MallOrder','id','order_id')->field('unit_score,id,mg_id,type,gs_id,ps_id,ps_type,goods_name,goods_image,unit_price,origin_price,goods_spec,goods_spec_name,buy_nums,status');
    }
}
